Fix bug when resizing mini window (Bug#16424).
authormartin rudalics <rudalics@gmx.at>
Mon, 13 Jan 2014 11:30:30 +0000 (12:30 +0100)
committermartin rudalics <rudalics@gmx.at>
Mon, 13 Jan 2014 11:30:30 +0000 (12:30 +0100)
* xdisp.c (resize_mini_window): Round height to a multiple of
frame's line height.  Fix bug in calculation of window start
position (Bug#16424).

src/ChangeLog
src/xdisp.c

index 62a75e71eb77d5b70c1b36bcc0309cdca916e039..4bdc1534eaa9f208f8deca130cb12c7d7f4e07ad 100644 (file)
@@ -1,3 +1,9 @@
+2014-01-13  Martin Rudalics  <rudalics@gmx.at>
+
+       * xdisp.c (resize_mini_window): Round height to a multiple of
+       frame's line height.  Fix bug in calculation of window start
+       position (Bug#16424).
+
 2014-01-13  Jan Djärv  <jan.h.d@swipnet.se>
 
        * macfont.m: Include termchar.h.
index 8efe3492db08d5e9c9e461ecdf73db76adcc05aa..bd6630a23c3c680d55cd68fc04e0dd11792a6c61 100644 (file)
@@ -10658,9 +10658,9 @@ resize_mini_window (struct window *w, int exact_p)
       /* Compute a suitable window start.  */
       if (height > max_height)
        {
-         height = max_height;
+         height = (max_height / unit) * unit;
          init_iterator (&it, w, ZV, ZV_BYTE, NULL, DEFAULT_FACE_ID);
-         move_it_vertically_backward (&it, height);
+         move_it_vertically_backward (&it, height - unit);
          start = it.current.pos;
        }
       else